<template>
  <div class="leading">
    <div class="leading-title" @click="goModule('/medicalLeading')">
      <span class="iconfont icon-leading">&#xe6e7;</span>
      <span class="leading-title-text">医学前沿</span>
    </div>
    <div class="leading-content" v-for="(item,i) in list.slice(0,7)" :key="i">
      <div class="item-title">
        <span class="iconfont icon-point">&#xe757;</span>
        <span
          class="word"
          :underline="false"
          href="https://www.nejmqianyan.cn/article-info?permalinks=YXQYcp1809396"
          target="_blank"
          @click="goArticle(item.artId)">
          {{item.title}}
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:['list'],
  methods:{
    goArticle(artId){
      let link = this.$router.resolve({
        path: "/article",
        query: { artId: artId },
      });
      window.open(link.href, "_blank");
    },
    goModule(route){
      let link = this.$router.resolve({
        path: route,
      });
      window.open(link.href, "_blank");
    },
  }
};
</script>

<style lang="less" scoped>
.el-link {
  font-size: 16px;
  color:#000;
}
.leading {
  margin-top: 10px;
  .leading-title {
    padding-bottom: 10px;
    font-size: 18px;
    .icon-leading {
      color: @themeColor;
      font-size: 24px;
      vertical-align: bottom;
    }
    .leading-title-text {
      cursor: pointer;
      &:hover {
        color: @themeColor;
      }
    }
  }
  .leading-content {
    margin-bottom: 20px;
    .icon-point {
      color: #e1e1e1;
      vertical-align: bottom;
      float: left;
    }
    .word {
      height: 25px;
      line-height: 25px;
    }
    .item-title {
      cursor: pointer;
      font-size: 16px;
      text-align: left;
      padding-left: 60px;
      width: 500px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      &:hover {
        color: @themeColor;
      }
    }
  }
}
</style>